import { httpInstance } from '@/utils/request'

interface FetchPaymentRecordAPIParams {
  page?: string
  limit?: string
  keyword?: string
}

interface FetchPaymentRecordAPIResData {
  code: number
  data: {
    current_page: number
    data: PaymentRecord[]
    last_page: number
    per_page: string
    total: number
  }
  msg: string
  time: string
}

export function fetchPaymentRecordAPI(params: FetchPaymentRecordAPIParams, token: string) {
  return httpInstance.get<FetchPaymentRecordAPIResData>(
    'api/Project_extend/projectCwPayList',
    { params, headers: { token } },
  )
}
